package com.mpyy.service.systemSetting;

import com.mpyy.dao.systemSetting.SupplierInformationDao;
import com.mpyy.pojo.SupplierInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @version 1.0
 * @Descrioption SupplierInformationServiceImpl
 * @Author QIAO
 * @Date 2022-03-23 16:01
 */
@Service(value = "supplierInformationServiceImpl")
public class SupplierInformationServiceImpl implements SupplierInformationServiceInter {
    @Autowired
    @Qualifier("supplierInformationDao")
    private SupplierInformationDao supplierInformationDao;

    /**
     * 查找供应商数据
     * @param supplierInfo
     * @return
     */
    @Override
    public List<SupplierInfo> searchSupplierInfoData(SupplierInfo supplierInfo) {
        List<SupplierInfo> supplierInfos = supplierInformationDao.searchSupplierInfoData(supplierInfo);
        return supplierInfos;
    }

    /**
     * 新增供应商信息
     * @param supplierInfo
     * @return
     */
    @Override
    public int insertSupplierInfoData(SupplierInfo supplierInfo) {
        int rows = supplierInformationDao.insertSupplierInfoData(supplierInfo);
        return rows;
    }

    /**
     * 修改供应商信息
     * @param supplierInfo
     * @return
     */
    @Override
    public int updateSupplierInfoData(SupplierInfo supplierInfo) {
        int rows = supplierInformationDao.updateSupplierInfoData(supplierInfo);
        return rows;
    }

    /**
     * 删除供应商信息
     * @param supplierInfo
     * @return
     */
    @Override
    public int deleteSupplierInfoData(SupplierInfo supplierInfo) {
        int rows = supplierInformationDao.deleteSupplierInfoData(supplierInfo);
        return rows;
    }
}
